﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Arch.Model
{
    public interface IValidationErrorInfo : IEntity
    {
        [Display(AutoGenerateField = false)]
        ICollection<ValidationResult> ValidationErrors { get; }
    }

    public static class ValidationErrorInfoExtentions
    {
        public static void AddError(this IValidationErrorInfo obj, ValidationResult validationResult)
        {
            obj.ValidationErrors.Add(validationResult);
        }
    }
}
